<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <span>会员名</span>
    <input type="text" class="name1">
    <p></p>
    </div>
    
    <script>
        // document.body.nextElementSibling
        var name1=document.querySelector('.name1');
        var name2=/^[\u4e00-\u9f5a-zA-Z]{5,25}$/;
        name1.oninput=(e)=>{
            var el=e.target;
            if(name2.test(name1.value)){
                el.nextElementSibling.innerHTML='√'
            }else{
                el.nextElementSibling.innerHTML='×'

            }
        }
    </script>
</body>
</html>